home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / blkade11.zip / BLKADE1.C < prev    next >
C/C++ Source or Header  |  1991-02-03  |  2KB  |  38 lines

  1.  
  2. /*---------------------------------------------------------------------*/
  3. /*   Contains messages corresponding to the error codes returned       */
  4. /*   by blockade() & calc_crc_file().                                  */
  5. /*                                                                     */
  6. /*   Returns a read only pointer to the appropriate message.           */
  7. /*                                                                     */
  8. /*                                                                     */
  9. /*---------------------------------------------------------------------*/
  10.  
  11. char * get_blk_err_msg(int num)
  12. {
  13.   char *sp;
  14.   static char *blk_err_msgs[] = {
  15.     "No error",                          /*  0  */
  16.     "No memory for buffer",              /*  1  */
  17.     "Error opening file",                /*  2  */
  18.     "No memory for file buffering",
  19.     "File buffering failure",            /*  4  */
  20.     "Fseek error",
  21.     "Error reading data block",          /*  6  */
  22.     "Invalid data block info",
  23.     "Error reading file",                /*  8  */
  24.     "Error reading file",                /*  9  */
  25.     "Error reading file",                /* 10  */
  26.     "Check Value error",                 /* 11  */
  27.     "File size error",                   /* 12  */
  28.     "Invalid error number" };            /* 13  */
  29.  
  30.    if (num == -1) num = 11;
  31.    if (num == -2) num = 12;
  32.    if ((num < 0) || (num > 12))  num = 13;    /* out of range */
  33.    sp = blk_err_msgs[num];
  34.    return(sp);
  35.   }
  36.  
  37. /*---------------------------------------------------------------------*/
  38.